<?php

namespace Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * LotteryTicket
 *
 * @ORM\Table(name="lottery_ticket")
 * @ORM\Entity
 */
class LotteryTicket
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="number", type="integer", nullable=false)
     */
    protected $number;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_winning", type="boolean", nullable=false)
     */
    protected $isWinning;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="last_modified", type="datetime", nullable=false)
     */
    protected $lastModified;

    /**
     * @var \Entity\Lottery
     *
     * @ORM\ManyToOne(targetEntity="Entity\Lottery")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="lottery_id", referencedColumnName="id")
     * })
     */
    protected $lottery;

    /**
     * @var \Entity\User
     *
     * @ORM\ManyToOne(targetEntity="Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id_owner", referencedColumnName="id")
     * })
     */
    protected $userOwner;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set number
     *
     * @param integer $number
     * @return LotteryTicket
     */
    public function setNumber($number)
    {
        $this->number = $number;
    
        return $this;
    }

    /**
     * Get number
     *
     * @return integer 
     */
    public function getNumber()
    {
        return $this->number;
    }

    /**
     * Set isWinning
     *
     * @param boolean $isWinning
     * @return LotteryTicket
     */
    public function setIsWinning($isWinning)
    {
        $this->isWinning = $isWinning;
    
        return $this;
    }

    /**
     * Get isWinning
     *
     * @return boolean 
     */
    public function getIsWinning()
    {
        return $this->isWinning;
    }

    /**
     * Set lastModified
     *
     * @param \DateTime $lastModified
     * @return LotteryTicket
     */
    public function setLastModified($lastModified)
    {
        $this->lastModified = $lastModified;
    
        return $this;
    }

    /**
     * Get lastModified
     *
     * @return \DateTime 
     */
    public function getLastModified()
    {
        return $this->lastModified;
    }

    /**
     * Set lottery
     *
     * @param \Entity\Lottery $lottery
     * @return LotteryTicket
     */
    public function setLottery(\Entity\Lottery $lottery = null)
    {
        $this->lottery = $lottery;
    
        return $this;
    }

    /**
     * Get lottery
     *
     * @return \Entity\Lottery 
     */
    public function getLottery()
    {
        return $this->lottery;
    }

    /**
     * Set userOwner
     *
     * @param \Entity\User $userOwner
     * @return LotteryTicket
     */
    public function setUserOwner(\Entity\User $userOwner = null)
    {
        $this->userOwner = $userOwner;
    
        return $this;
    }

    /**
     * Get userOwner
     *
     * @return \Entity\User 
     */
    public function getUserOwner()
    {
        return $this->userOwner;
    }
}
